import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'
import ValidatePipe from './common/ValidatePipe'
import { TransformInterceptor } from './TransformInterceptor.Interceptor'
import { NestExpressApplication } from '@nestjs/platform-express'
async function bootstrap() {
    const app = await NestFactory.create<NestExpressApplication>(AppModule)
    app.enableCors()
    app.useGlobalPipes(new ValidatePipe())
    app.useStaticAssets('static', { prefix: '/static' })
    app.useGlobalInterceptors(new TransformInterceptor())
    await app.listen(3000)
}

bootstrap()
